import types from '../action-types'
import { AnyAction } from 'redux'

const initState = {
    sidebarCollapsed: false,
};
export default (state = initState, action: AnyAction) => {
    switch (action.type) {
        case types.APP_TOGGLE_SIDEBAR:
            return {
                ...state,
                sidebarCollapsed: !state.sidebarCollapsed,
            };
        default:
            return state;
    }
}
